package com.buaa.student.service.impl;

import com.buaa.student.service.LoginService;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class LoginServiceImpl implements LoginService {
    static HashMap<String, String> map;
    static {
        map = new HashMap<>();
        map.put("txx","txx");
        map.put("wkm","wkm");
        map.put("lyj","lyj");
        map.put("fs","fs");
    }

    @Override
    public boolean checkLogin(String username, String password) {

        String s = map.get(username);
        if(s != null){
            if(password.equals(s)){
                return true;
            }
        }

        return false;
    }
}
